package com.chenyu.util;

import com.chenyu.pojo.Person;
import org.dom4j.DocumentException;
import org.dom4j.Element;

import java.io.FileNotFoundException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.*;

public class Main {

    public static void main(String[] args) throws Exception {
//        //获取项目地址
//        System.out.println(System.getProperty("user.dir"));
//
//        "".intern();
//
//        Set<Person> set = new HashSet<Person>();
//        Person p1 = new Person("唐僧","pwd1",25);
//        Person p2 = new Person("孙悟空","pwd2",26);
//        Person p3 = new Person("猪八戒","pwd3",27);
//        set.add(p1);
//        set.add(p2);
//        set.add(p3);//现在set里面有3个对象!
//        p3.setAge(2); //修改p3的年龄,此时p3的hashcode改变
//        set.remove(p3); //此时remove不掉，造成内存泄漏
//        set.add(p3); //重新添加，成功，现在set里面有4个对象
//
//        System.out.println("完成");
        Person person = new Person("","",1);
        Person person1 = new Person("1","",1);
        System.out.println(person.hashCode());
        System.out.println(person1.hashCode());
    }
}
